<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <title>找回密码 - {:config('web_webname')}</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" type="text/css" href="//cdn.istt.cn/Ver/1.0/web/app.css"/>
    <link rel="stylesheet" type="text/css" href="//cdn.istt.cn/Ver/1.0/css/style.css"/>
    <style type="text/css">
        .w400 {
            max-width: 400px;
        }
    </style>
</head>
<body class="o-y bg-bai dk">
<div class="bg-qing dk  m0 pt8 pb8 t-c"><h2>找回密码</h2></div>
<div class="container w400 pt8 pb8 t-c">
	<div class="mt5 f5 bold">系统会自动将新密码发送到你账号绑定的邮箱</font></div>
    <div class="mt5">
        <div class="list p3">
            <div class="input"><span class="input-addon no pl2 f1">账号</span><input type="text" placeholder="请输入登陆账号"
                                                                                   value=""
                                                                                   class="form no f4" id="user"></div>
        </div>
    </div>
    <button class="btn btn-qing btn-lg btn-block mt11 autoenter" onclick="ajax_button()">发送邮件</button>
    <div class="o-h mt7"><span class="fl"><a class="lan" href="{:url('index/login')}">返回登陆</a></span> <span
            class="fr"><a class="lan" href="{:url('index/reg')}">注册账号</a></span></div>
    <div class="mt10"><p class="f0 hui">Copyright &copy; 2020 {:config('web_webname')}</p></div>
    <div id="ajaxshow"></div>
</div>
<script type="text/javascript" src="/Static/config/js/jquery-2.1.4.min.js"></script>
<script src="//cdn.bootcss.com/jquery.pjax/2.0.1/jquery.pjax.min.js"></script>
<script type="text/javascript" src="//cdn.istt.cn/Ver/1.0/web/layer.min.js"></script>
<script src="/Static/config/js/main.js"></script>
<script src="/Static/config/js/app.js"></script>
<script>
    function ajax_button() {
        var user, pass, mode, from;
        user = $('#user').val();
        if (!user || user == '') {
            $('#user').focus();
            x.msg("请输入登陆账号!");
            return false;
        }
        from = {
            username: user,
        };
        var load = x.loading();
        app.ajax("{:url('LoginAjax/find')}", from, function (data) {
            layer.close(load);
            if (data.code === 0) {
                x.loading(data.msg);
                setTimeout(function () {
                    window.location.href = "{:url('index/login')}";
                }, 1000)
            } else {
                x.btn('找回失败', data.msg, '');
            }
        }, '', false);
    }
</script>
</body>
</html>